package com.teach.food.service.Impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import com.teach.commons.MD5;
import com.teach.entity.UserInfo;
import com.teach.exception.CodeException;
import com.teach.food.entity.FoodMerchant;
import com.teach.food.service.FoodMerchantService;
import com.teach.mapper.FoodMerchantMapper;
import com.teach.mapper.UserInfoMapper;

@Service
public class FoodMerchantServiceImpl implements FoodMerchantService {

	@Autowired
	private FoodMerchantMapper mapper;
	
	@Override
	public List<FoodMerchant> selectAll() {
		
		return mapper.selectAll();
	}



	@Override
	public void modify(FoodMerchant foodMerchant) {
		mapper.updateByPrimaryKeySelective(foodMerchant);
		
	}

	@Override
	public FoodMerchant get(Integer foodMerchantId) {
		return mapper.selectByPrimaryKey(foodMerchantId);
	}
	
	@Override
	public FoodMerchant getByName(String name) {
		return mapper.selectByName(name);
	}

}
